 <?php
	print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n");
	print("<Result>\n");
	print("<KID>");
	if(!isset($_GET["ConID"]) || !isset($_GET["KID"]) || !isset($_GET["type"]))
	{
		print("</KID> \n");
		print("</Result>\n");
		return;
	}
	$db = mysql_connect("localhost","root","root");
    mysql_select_db("brainway");
	$query = "insert into knowledge_conclusion values(".$_GET["KID"].",".$_GET["ConID"].",".$_GET["type"].")";
    $result = mysql_query($query);
    if($result==null)       //name has existed
    {
	print("</KID> \n");
        print("</Result>\n");
		return;
    }

    print($_GET["KID"]."</KID> \n");
    print("<ConID>".$_GET["ConID"]."</ConID> \n");
    print("<type>".$_GET["type"]."</type> \n");
    print("</Result>");
?>